cls
setlocal

set PATH=%DXROOT%\ProductionTools;C:\Program Files (x86)\HTML Help Workshop;%PATH%
set BIN_PATH="C:\Users\rsato\Visual Studio 2005\Projects\iislogreader\iislogreader.dll\iislogreader.dll\bin\Debug\iislogreader.dll"
set OUT_DIR="C:\Users\rsato\Visual Studio 2005\Projects\iislogreader\iislogreader.dll\iislogreader.dll\bin\Debug\"
set PRESENTATION_STYLE=vs2005

if not exist %OUT_DIR% mkdir %OUT_DIR%
cd %OUT_DIR%

REM ********** Call MRefBuilder ****************************

MRefBuilder %BIN_PATH% /out:reflection.org

REM ********** Apply Transforms ****************************

if %PRESENTATION_STYLE%==vs2005 (
    XslTransform /xsl:"%DXROOT%\ProductionTransforms\ApplyVSDocModel.xsl" reflection.org /xsl:"%DXROOT%\ProductionTransforms\AddFriendlyFilenames.xsl" /out:reflection.xml /arg:IncludeAllMembersTopic=true /arg:IncludeInheritedOverloadTopics=true
) else if %PRESENTATION_STYLE%==hana (
    XslTransform /xsl:"%DXROOT%\ProductionTransforms\ApplyVSDocModel.xsl" reflection.org /xsl:"%DXROOT%\ProductionTransforms\AddFriendlyFilenames.xsl" /out:reflection.xml /arg:IncludeAllMembersTopic=false /arg:IncludeInheritedOverloadTopics=true
) else (
    XslTransform /xsl:"%DXROOT%\ProductionTransforms\ApplyPrototypeDocModel.xsl" reflection.org /xsl:"%DXROOT%\ProductionTransforms\AddGuidFilenames.xsl" /out:reflection.xml
)

XslTransform /xsl:"%DXROOT%\ProductionTransforms\ReflectionToManifest.xsl" reflection.xml /out:manifest.xml

call "%DXROOT%\Presentation\%PRESENTATION_STYLE%\copyOutput.bat"

REM ********** Call BuildAssembler ****************************

BuildAssembler /config:"%DXROOT%\Presentation\%PRESENTATION_STYLE%\configuration\sandcastle.config" manifest.xml

XslTransform /xsl:"%DXROOT%\ProductionTransforms\ReflectionToChmProject.xsl" reflection.xml /out:Output\test.hhp

REM **************Generate an intermediate Toc file that simulates the Whidbey TOC format.

if %PRESENTATION_STYLE%==prototype (
    XslTransform /xsl:"%DXROOT%\ProductionTransforms\createPrototypetoc.xsl" reflection.xml /out:toc.xml
) else (
    XslTransform /xsl:"%DXROOT%\ProductionTransforms\createvstoc.xsl" reflection.xml /out:toc.xml
)

REM ************ Generate CHM help project ******************************

XslTransform /xsl:"%DXROOT%\ProductionTransforms\TocToChmContents.xsl" toc.xml /out:Output\test.hhc

XslTransform /xsl:"%DXROOT%\ProductionTransforms\ReflectionToChmIndex.xsl" reflection.xml /out:Output\test.hhk

hhc Output\test.hhp

endlocal